package com.itheima.reggie.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 员工实体
 */
@Data
public class Employee {
    private static final long serialVersionUID = 1L;

    private Long id;

    private String username;

    private String name;

    private String password;

    private String phone;

    private String sex;

    private String idNumber; // 身份证号码

    private Integer status; //

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime; // 插入时填充字段

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime; // 插入和更新时填充字段

    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    /**
     * mp进行自动填充
     * 1.加注解
     *
     * 2. 需要实现一个类 必须实现一个接口 MetaObjectHandler
     */
}
